#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int a[1001], n;

void reverse(int a[], int size)
{
    int left = 0, right = size - 1;
    while (left < right)
    {
        int tmp = a[left];
        a[left] = a[right];
        a[right] = tmp;
        left++;
        right--;
    }
    for (int i = 0; i < n; i++)
        cout << a[i] << ' ';
}

int main()
{
    int size;
    cin >> n >> size;
    for (int i = 0; i < n; i++)
        cin >> a[i];
    reverse(a, size);
    return 0;
}
